Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Add user option to toggle timezone adjustment #437

Merged

Conversation

jancernik
Copy link
Member

@jancernik jancernik commented Sep 12, 2023

  • The button only appears when enable_timezone_offset_for_calendar_events is set to true.
  • The option is not persistent; it resets each time the calendar is loaded.
  • By default, the offset is disabled and is configurable via default_timezone_offset_user_option.
  • Similar to changing the timezone, it takes some time to rerender the events, depending on the number of them.

demo

Copy link
Contributor

@pmusaraj pmusaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, mostly cosmetic comments.

@jancernik
Copy link
Member Author

I changed the code to manually add a button in the header instead. I used iconHTML("globe") instead of text.
It's nice because it required less refactoring, so I reverted those changes back.
I updated the gif in the description.

Copy link
Contributor

@pmusaraj pmusaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Approving, but I do think the button CSS classes need a little bit of cleaning up to match core.

Copy link
Contributor

@pmusaraj pmusaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, LGTM!

@jancernik jancernik merged commit 41816b0 into discourse:main Sep 13, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants